package com.qf.first.controller;

import com.qf.first.pojo.vo.RespVo;

public class BaseController {
    public RespVo convertSuccess(Object data){
        RespVo<Object> respVo = new RespVo<>();
        respVo.setData(data);
        return respVo;
    }

    public RespVo  convertSuccess(String msg){
        RespVo<Object> respVo = new RespVo<>();
        respVo.setMsg(msg);
        return respVo;
    }

    public RespVo convertFail(String msg){
        RespVo<Object> respVo = new RespVo<>();
        respVo.setMsg(msg);
        respVo.setCode(RespVo.CodeType.FAIL.getValue());
        return respVo;
    }
    //标准未登录方法
}
